package com.szr.leex.service.impl;

import java.io.Serializable;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.transaction.annotation.Transactional;

import com.szr.leex.dao.BaseDao;
import com.szr.leex.service.BaseService;

/**
 * 项目基础service impl
 * Created by WangChen on 2018/8/25 11:46.
 */
@Transactional
public abstract class BaseServiceImpl<T, ID extends Serializable> implements BaseService<T, ID> {

    protected Logger logger = LoggerFactory.getLogger(this.getClass());

    public abstract BaseDao<T, ID> getBaseDao();

    @Override
    public T save(T entity) {
        return getBaseDao().save(entity);
    }
}
